<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格</title>
</head>
<body>
<!-- 3*3表格，设置宽度和边线，并显示1像素的边线 -->
<table border="1" width="400px" cellspacing="0" cellpadding="0" align="center">
    <tr><!--<th>标签⽤于定义表头。单元格内的内容默认居中、加粗-->
        <th>1 标题</th>
        <th>2 标题</th>
        <th>3 标题</th>
    </tr>
    <tr>
        <td>4</td>
        <td>5</td>
        <td>6</td>
    </tr>
    <tr>
        <td>7</td>
        <td>8</td>
        <td>9</td>
    </tr>
</table>

<br/>

<!-- 3*3表格，将第⼀⾏全部合并 -->
<table border="1" width="400px" cellspacing="0" cellpadding="0" align="center">
    <tr>
        <td colspan="3" bgcolor="#ddd">a</td>
    </tr>
    <tr>
        <td>4</td>
        <td>5</td>
        <td>6</td>
    </tr>
    <tr>
        <td>7</td>
        <td>8</td>
        <td>9</td>
    </tr>
</table>
</body>
</html>